﻿using BCCommon.Enums;
using BCCommon.Extensions;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCDto.Common.Exception
{
    /// <summary>
    /// App异常信息记录
    /// </summary>
    public class AppExceptionRecordDto
    {
        /// <summary>
        /// App异常记录Id
        /// </summary>
        public long AppExceptionRecordId { get; set; }
        /// <summary>
        /// 操作系统
        /// </summary>
        public OSType OsType { get; set; }
        /// <summary>
        /// 操作系统字符串
        /// </summary>
        public string OsTypeStr { get { return this.OsType.GetDescriptionString(); } }
        /// <summary>
        /// 系统版本
        /// </summary>
        public string OsVersion { get; set; }
        /// <summary>
        /// 手机品牌
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 应用类型
        /// </summary>
        public AppType AppType { get; set; }
        /// <summary>
        /// 应用版本
        /// </summary>
        public string AppVersion { get; set; }
        /// <summary>
        /// 应用类型字符串
        /// </summary>
        public string AppTypeStr { get { return this.AppType.GetDescriptionString(); } }
        /// <summary>
        /// 异常类型
        /// </summary>
        public ExceptionType ExceptionType { get; set; }
        /// <summary>
        /// 异常类型字符串
        /// </summary>
        public string ExceptionTypeStr { get { return this.ExceptionType.GetDescriptionString(); } }
        /// <summary>
        /// 异常名称
        /// </summary>
        public string ExceptionName { get; set; }
        /// <summary>
        /// 异常级别
        /// </summary>
        public int ExceptionLevel { get; set; }
        /// <summary>
        /// 堆栈信息
        /// </summary>
        public string StackTrace { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        public string Data { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 处理状态
        /// </summary>
        public AppExceptionHandleStatus HandleStatus { get; set; }
        /// <summary>
        /// 处理状态字符串
        /// </summary>
        public string HandleStatusStr { get { return this.HandleStatus.GetDescriptionString(); } }
        /// <summary>
        /// 解决时间
        /// </summary>
        public DateTime? ResolvedTime { get; set; }
        /// <summary>
        /// 解决备注
        /// </summary>
        public string ResolvedRemark { get; set; }
        /// <summary>
        /// 搁置原因
        /// </summary>
        public string ShelvedRemark { get; set; }
    }
}
